import axios from "axios"
const host  = 'http://127.0.0.1:8888'
// const host = 'http://www.cczztt.club:8888'
const request = axios.create({
    baseURL:host +"/api"
})

export {host}

export function getUserList(param){
    return request({
        method:'get',
        url:'/userList',
        params:param
    })
}

export function getBookList(param){
    return request({
        method:'get',
        url:'/bookList',
        params:param
    })
}

export function updateUser(param){
    return request({
        method:'post',
        url:'/updateUser',
        data:param
    })
}

export function delUser(param){
    return request({
        method:'post',
        url:'/deleteUser',
        data:param
    })
}

export function updateBook(param){
    return request({
        method:'post',
        url:'/updateBook',
        data:param
    })
}

export function login(param){
    return request({
        method:'post',
        url:'/login',
        data:param
    })
}

export function regist(param){
    return request({
        method:'post',
        url:'/regist',
        data:param
    })
}

export function getBook81(){
    return request({
        method:'get',
        url:'/getBook81',
    })
}